//
//  SYS_LoginModelHelp.m
//  System_App
//
//  Created by 魏配军 on 2017/11/28.
//  Copyright © 2017年 czy001. All rights reserved.
//

#import "SYS_LoginModelHelp.h"
#import "SYS_LoginModel.h"

@implementation SYS_LoginModelHelp

static SYS_LoginModelHelp *instance = nil;
+ (SYS_LoginModelHelp *)instance{
    @synchronized(self){
        if (instance == nil) {
            instance = [SYS_LoginModelHelp new];
        }
    }
    return instance;
}

- (void)reset{
    instance = NULL;
}

+ (void)initUserInfo{
    NSDictionary *dicss=[NSKeyedUnarchiver unarchiveObjectWithFile:LoginFilePath];
    SYS_LoginModel *models = [SYS_LoginModel mj_objectWithKeyValues:dicss];

    [SYS_LoginModel instance].sessionInfo = models.sessionInfo;
    [SYS_LoginModel instance].user    = models.user;
    [SYS_LoginModel instance].admin   = models.admin;
    
}


@end
